// 账号申请
import request from '@/config/request'

interface UpdateApplicationStatusParams {
    id: string | number;
    status: string | number;
}

// 获取审核列表
export const accountApply = (params: number) => {
    return request.get(`/admin/application/list?type=${params}`)
}

// 获取申请详情
export const accountApplyDetail = (params: number) => {
    return request.get(`/admin/application/get?id=${params}`)
}

//修改审核状态
export const accountApplyStatus = (params: UpdateApplicationStatusParams) => {
    return request.post('/admin/application/update', {}, {
        params: params  // 自动作为 query 发送
    });
};

// 删除申请信息
export const accountApplyDelete = (id: number) => {
    return request.post(`/admin/application/delete?id=${id}`)
}

// 查看解绑审核列表
export const accountUnbind = (type: number) => {
    return request.get(`/admin/application/unbind/list?type=${type}`)
}

// 获取解绑详情
export const accountUnbindDetail = (id: number) => {
    return request.get(`/admin/application/unbind/get?id=${id}`)
}

// 修改解绑审核状态
export const accountUnbindStatus = (params: UpdateApplicationStatusParams) => {
    return request.post('/admin/application/unbind/update', {}, {
        params: params  // 自动作为 query 发送
    });
}